<template>
  <div class="login-form">
    <div class="glass-card login-card">
      <span class="header">欢迎登录</span>
      <div class="form-con">
        <el-form :label-position="labelPosition" :model="form">
          <el-form-item label="Name : ">
            <el-input v-model="form.name" placeholder="请输入您的账号" />
          </el-form-item>
          <el-form-item label="Password : ">
            <el-input v-model="form.Password" placeholder="请输入您的密码" type="password" />
          </el-form-item>
        </el-form>
      </div>
      <div class="btn">
        <el-button @click="submit">确定</el-button>
      </div>
    </div>
    <div class="text"></div>
  </div>
</template>

<script lang="ts" setup>
import { reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const labelPosition = ref('top')
const route = useRoute()
const router = useRouter()
const form = reactive({
  name: 'admin',
  Password: '123456'
})
const submit = () => {
  router.push({ name: 'main' })
}
</script>

<style lang="scss">
.login-form {
  width: 100%;
  height: 100%;
  position: relative;
  .login-card {
    width: 400px;
    height: 500px;
    position: absolute;
    right: 100px;
    bottom: 230px;
    padding: 0 24px;
    .header {
      font-size: 24px;
      line-height: 80px;
      display: block;
      margin-bottom: 10px;
    }
    .el-form-item__label {
      font-size: 18px;
      color: #fff !important;
    }
    .btn {
      margin-top: 60px;
      .el-button {
        width: 100%;
        height: 40px;
        font-size: 18px;
      }
    }
  }
  .text {
    height: 100vh;
    background: linear-gradient(45deg, #000 0, #000 50%, #fff 50%);
    &::before {
      content: '欢迎来到我的世界!';
      font-size: 100px;
      position: absolute;
      top: 50%;
      left: 28%;
      transform: translate(-50%, -50%);
      color: #fff;
      mix-blend-mode: difference;
      animation: move 3s infinite linear alternate;
    }
    @keyframes move {
      0% {
        transform: translate(-70%, -50%);
      }
      100% {
        transform: translate(0%, -50%);
      }
    }
  }
}
</style>
